<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>快来点外卖吧</title>
<%----%>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <link rel="stylesheet" href="../statics/css/note.css">
    <link rel="stylesheet" href="../statics/css/myform.css">
    <link rel="stylesheet" href="../statics/css/table.css">
    <link rel="stylesheet" href="../statics/css/text.css">
    <link rel="stylesheet" href="../statics/font/font_3580475_g38aeqiiuc6/iconfont.css">
    <script src="../statics/js/echarts.min.js"></script>
    <script src="../statics/js/tel.js"></script>
    <script src="../statics/js/form.js"></script>

    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
            background: url(../statics/images/util/bg.gif) repeat;
        }
    </style>

</head>
<body>


<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" style="font-size:25px" href="">点餐系统-点餐</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <%--    主页:分页显示菜品 --%>
                <li <c:if test="${navName=='index'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/userHome.do"><i class="iconfont icon-shouye "></i>&nbsp;主页</a></li>
                <li <c:if test="${navName=='userCar'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/userCar.do"><i class="iconfont icon-gouwucheman "></i>&nbsp;我的购物车</a></li>
                <li <c:if test="${navName=='interest'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/interest.do"><i class="iconfont icon-wodeguanzhu "></i>&nbsp;关注店铺</a></li>
                <li <c:if test="${navName=='person'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/person.do"><i class="iconfont icon-essential-information "></i>&nbsp;个人中心</a>
                <li <c:if test="${navName=='history'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/history.do"><i class="iconfont icon-zhangdan_o "></i>&nbsp;我的账单</a></li>
                <li <c:if test="${navName=='ordering'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/user/ordering.do"><i class="iconfont icon-dingdanzhuangtai "></i>&nbsp;我的订单</a></li>
            </ul>
            <form class="navbar-form navbar-right" role="search" action="${pageContext.request.contextPath}/sub/goIndex/findFoodByName.do">
                <div class="form-group">
                    <input type="text" name="name" class="form-control" placeholder="请输入店铺名或菜品名" value="${name}">
                </div>
                <button type="submit" class="btn btn-default">查询</button>
            </form>
        </div>
    </div>
</nav>


<div class="container">
    <div class="row-fluid">
        <div class="col-md-3">
            <div class="data_list">
<%--                用户信息--%>
                <div class="data_list_title"><span class="iconfont icon-essential-information "></span>&nbsp;个人中心&nbsp;&nbsp;&nbsp;&nbsp;<a href="user?userId=${userId}">退出</a></div>
                <div class="userimg">
                    <img src="../statics/images/user/${user.userImg}" style="width: 100%">
                </div>
                <div class="nick">${user.userName}</div>
<%--    --%>
                <c:if test="${!empty userAddress}">
                    <div class="data_list_title">
                                    <span class="iconfont icon-iconfront-">
                                    </span>&nbsp;当前点餐信息
                    </div>
                    <div class="mood"> 地址:${userAddress.pos},姓名:${userAddress.uname},电话:${userAddress.uphone} </div>
                </c:if>
    <%--                用户名--%>
    <%--当前的地址--%>
            </div>
            <c:if test="${!empty userAddress}">
                <div class="data_list">
                        <%--订单状态--%>
                    <div class="data_list_title">
                        <span class="iconfont icon-dingdanzhuangtai "></span>&nbsp;订单状态
                    </div>
                        <%--                已收货--%>
                    <div>
                        <ul class="nav nav-pills nav-stacked">
                            <li><a href="index?actionName=searchDate&date=${item.groupName}">待送餐 <span class="badge">${orderNum1}</span></a></li>
                            <li><a href="index?actionName=searchDate&date=${item.groupName}">送餐中 <span class="badge">${orderNum2}</span></a></li>
                            <li><a href="index?actionName=searchDate&date=${item.groupName}">待评论 <span class="badge">${orderNum3}</span></a></li>
                            <li><a href="index?actionName=searchDate&date=${item.groupName}">已评论 <span class="badge">${orderNum4}</span></a></li>
                        </ul>
                    </div>
                        <%--                待支付:购物车几件--%>
                        <%--                送餐中--%>
                </div>
                <div class="data_list">
                    <div class="data_list_title">
					<span class="iconfont icon-wodeguanzhu "></span>&nbsp;关注店铺
                    </div>
                    <div>
                        <ul class="nav nav-pills nav-stacked">
                            <c:forEach items="${interestList}" var="shop">
                                <li <c:if test="${shop.shopId==interestId}"> class="active" </c:if> id="li_${shop.shopId}"><a href="${pageContext.request.contextPath}/user/userInterest.do?shopId=${shop.shopId}"><span id="sp_${shop.shopId}">${shop.shopName}</span> <span class="badge">${shop.workStatue}</span></a></li>
                            </c:forEach>
                        </ul>
                    </div>
                </div>
            </c:if>
        </div>
    </div>

    <%--    如果考虑后端完美的情况下--%>
    <%--通过是否有送餐地址来判断是否加载--%>
    <%--拟态框会把提示信息覆盖不行--%>
        <c:if test="${empty userAddress}">
            <jsp:include page="/user/goAddress.do"/>
        </c:if>
<%--    右侧页面不能加载--%>
        <c:if test="${!empty userAddress}">
             <jsp:include page="${uri}"/>
        </c:if>


</div>

</body>
</html>
